import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './plugins/element.js'
import 'font-awesome/css/font-awesome.min.css'
// 导入NProgress 对应的js和css
// import NProgress from 'nprogress'
// import 'nprogress/nprogress.css'
import axios from 'axios'
// 在request拦截器中展示进度条 NProgress.start()
axios.defaults.baseURL = 'http://127.0.0.1:5000'

// axios.interceptors.request.use(config => {
//   NProgress.start()
//   return config // 必须返回否则没有值
// })
// // 在reponse拦截器中,隐藏进度条 NProgress.done()
// axios.interceptors.response.use(config => {
//   NProgress.done()
//   return config
// })
Vue.prototype.$http = axios

Vue.config.productionTip = false
new Vue({
  router,
  store,
  render: h => h(App),
}).$mount('#app')
